﻿using System;
using System.Collections.Generic;
using DevExpress.Xpo;
using System.Text;

namespace BusinessObjects
{
    public class NganhHoc : XPObject
    {
        public NganhHoc()
            : base()
        {
            // This constructor is used when an object is loaded from a persistent storage.
            // Do not place any code here.
        }

        public NganhHoc(Session session)
            : base(session)
        {
            // This constructor is used when an object is loaded from a persistent storage.
            // Do not place any code here.
        }

        public override void AfterConstruction()
        {
            base.AfterConstruction();
            // Place here your initialization code.
        }

        //Fields
        string fMaNganhHoc = string.Empty;
        [Size(50)]
        public string MaNganhHoc
        {
            get { return fMaNganhHoc; }
            set { SetPropertyValue<string>("MaNganhHoc", ref fMaNganhHoc, value); }
        }
        string fTenNganhHoc = string.Empty;
        [Size(500)]
        public string TenNganhHoc
        {
            get { return fTenNganhHoc; }
            set { SetPropertyValue<string>("TenNganhHoc", ref fTenNganhHoc, value); }
        }
        string fMoTa;
        [Size(1000)]
        public string MoTa
        {
            get { return fMoTa; }
            set { SetPropertyValue<string>("MoTa", ref fMoTa, value); }
        }
        Khoa fKhoa;
        [Association(@"NganhHocReferencesKhoa")]
        public Khoa Khoa
        {
            get { return fKhoa; }
            set { SetPropertyValue<Khoa>("Khoa", ref fKhoa, value); }
        }
        [Association(@"SinhVienReferencesNganhHoc", typeof(SinhVien))]
        public XPCollection<SinhVien> SinhViens { get { return GetCollection<SinhVien>("SinhViens"); } }
    }
}
